import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from '../../store'
import '@/assets/style/index.less'
import '@/plugins/antd'

// import MyBread from '@/components/common/MyBread.vue'

Vue.config.productionTip = false

const remote = require('electron').remote
const Menu = remote.Menu
const MenuItem = remote.MenuItem

// new一个右键菜单
const menu = new Menu()

menu.append(new MenuItem({ label: '新增房源', click () { console.log('新增房源') } }))
menu.append(new MenuItem({ label: '新增客户', click () { console.log('新增客户') } }))
// 添加菜单分割线
menu.append(new MenuItem({ type: 'separator' }))
// 添加菜单功能
menu.append(new MenuItem({ label: '重新载入', click () { console.log('重新载入') } }))
// 添加菜单功能
menu.append(new MenuItem({ label: '退出程序', click () { console.log('退出程序') } }))

window.addEventListener('contextmenu', function (e) {
  e.preventDefault()
  menu.popup(remote.getCurrentWindow())
}, false)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
